<?php
	$data = new mysqli('127.0.0.1','root','','friday');
    $id = $_POST['id']; 
	mysqli_query($data,"SET NAMES utf8");
	$ip = intval($id,10);
	//设置查询语句
	$sql = "delete from fruit where id = '{$ip}'";

		if($data->query($sql)===TRUE){
			echo "删除成功";
		}else{
			echo "删除失败".$data->error;
		}
	
	mysqli_close($data);
?>